var Browser = Base({

    isIE : function () {
        return ($.browser.msie);
    },
    
    isIE7 : function () {
        return (this.isIE && parseInt($.browser.version, 10) === 7);
    },
    
    isIE8 : function () {
        return (this.isIE && parseInt($.browser.version, 10) === 8);
    },
    
    isIE9 : function () {
        return (this.isIE && parseInt($.browser.version, 10) === 9);
    },
    
    isLessThanIE9 : function () {
        return (this.isIE  && parseInt($.browser.version, 10) < 9);
    },
    
    isChrome : function () {
        return (/chrom(e|ium)/.test(navigator.userAgent.toLowerCase()));
    },
    
    isSafari : function () {
        return ($.browser.webkit && !this.isChrome());
    },
    
    isFireFox : function () {
        return ($.browser.mozilla);
    },
    
    isAndroid : function() {
        return !!navigator.userAgent.match(/Android/i);
    },

    isIOS : function() {
        return !!navigator.userAgent.match(/(iPad|iPhone|iPod)/i);
    },
    
    isTouchDevice : function () {
        return Modernizr.touch;
    },
    
    isBlackBerryCurve : function() {
        var ua = navigator.userAgent;

        if (ua.indexOf("BlackBerry") >= 0) {
            if (ua.indexOf("Version/") >= 0) {
                // BlackBerry 6 and 7
                var model = ua.match(/BlackBerry\s[0-9]*/);
                if (model) {
                    var model_number = model[0].match(/[0-9]+/);

                    if (model_number) model_number = model_number[0];

                    pos = ua.indexOf("Version/") + 8;
                    os_version = ua.substring(pos, pos + 3);

                    if (os_version === '6.0' && model_number === '9300') {
                        return true;
                    }
                }
            }
        }

        return false;
    }
  
});
